<template>
  <div>
    <h1>1. 生命周期</h1>
    <Life v-if="show"></Life>
    <p>-----销毁-------------</p>
    <button @click="show=false">销毁</button>
   
  <Axios></Axios>
  <More></More>
  <h4>4 $nextTick的使用</h4>

  <Tick></Tick>
  <p>------------------------------</p>
  <h4>5.组件对象里name的使用</h4>
  <ComName></ComName>
  </div>
</template>

<script>
import Life from './components/Life'
import Axios from './components/Axios'
import More from './components/More'
import Tick from './components/Tick'
import Com from './components/com'
export default {
  data () {
    return {
    show:true  
    }
  },
  components: {
    Life,
     Axios,
     More,
     Tick,
     [Com.name]:Com
    //  key如果是变量，必须用[]属性表达式
  }
}
</script>

<style>

</style>